home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Memphis Amiga Group / MAG DOS 2.0 Utilities Disk 06 (1992-04)(Memphis Amiga Group).zip / MAG DOS 2.0 Utilities Disk 06 (1992-04)(Memphis Amiga Group).adf / TG / TG Eyes.doc < prev    next >
Text File  |  1992-01-31  |  8KB  |  200 lines

  1.  
  2. *****************************************************************************
  3. *                                                                           *
  4. *                               TG Eyes                                     *
  5. *              ( copyright by Thomas Geib in July 1991 )                    *
  6. *                                                                           *
  7. *****************************************************************************
  8.  
  9.  
  10.  
  11. I   Introduction
  12. II  Setting parameters
  13. III Conditions of copying/distribution
  14.  
  15.  
  16.  
  17.  
  18. I: INTRODUCTION
  19. ---------------
  20.  
  21. Hi there !!!
  22.  
  23. I always wanted to write some program like this. The idea for this program is
  24. probably as old as Moses' beard, and I heard, that there is an "Eye"program
  25. around for the AMIGA as well. But self-written programs have one big
  26. advantage : You know what you are doing !!! I tried to save memory and
  27. process time as best as I could ( sorry, this time I didn't use assembler,
  28. it wouldn't have sped up the program that much calling system-routines all
  29. the time ).
  30.  
  31. The process time can be affected by two means :
  32.  
  33. - Set the parameter DELAY to a reasonable value like 5. This value determines
  34.   the time (in 1/50 seconds), how long the program will sleep after every
  35.   main loop. Set DELAY to 0 and you will get a very smooth eye-motion, but
  36.   the processor will be very busy. A DELAY=5 will do a good eye-motion as
  37.   well and needs ONLY 3%  processor time on a 68000 machine while you're not
  38.   moving the mouse, because no calculation is necessary then. When moving the
  39.   mouse, the input.device will need much time.
  40.  
  41. - The task priority of the program can be set ( see chapter II ). It doesn't
  42.   affect the processing as much as the DELAY-Value.
  43.  
  44. The CHIP-memory needed by the program is affected mainly by the maximum width
  45. and maximum height of the window. Choose it wisely. Who seriously wants to
  46. have a window for TGs Eyes as big as 640 x 200 or so more than once or twice?
  47.  
  48. The standard values in the TG Eyes.info file (for workbench startup and
  49. calling TG Eyes from CLI with no parameters given are reasonable. It then
  50. needs about 16K chip and 22K fast memory.
  51.  
  52. The window is of course SIZEABLE, but I always clear the graphics for the
  53. sizing-gadget, because it disturbs the symmetry of the eyes' graphics. But
  54. the gadget is still there, so you can use it.
  55.  
  56. When removing or inserting a disk into a disk-drive, the eyes will start
  57. rotating making just one loop. It looks silly, but it doesn't express the
  58. programs attitude about the data on the inserted/removed disk. I have some
  59. data and computer languages on my mind, which would do good enough on
  60. rolling eyes about them forever !
  61.  
  62. Talking about computer languages: I, as an addicted C-programmer, was
  63. writing this program using Aztec C V5.0 developer. C sure is a great
  64. language ! It would have taken YEARS without initialized data, with strict
  65. typecasting and importing definition modules.
  66.  
  67. About WORKBENCH 2.0 :
  68. As far as I know, the program works correct under Workbench 2.0, but I had
  69. to find out about the windows system dragbar height, which can be found in
  70. the windows gadget list (GadgetType == (SYSGADGET | WDRAGGING) ), because
  71. Workbench 2.0 supplies setting system fonts in many possible heights, making
  72. the window dragbars heigher.
  73. The standard WORKBENCH 2.0 colors make the TG Eyes.info icon look bad, but
  74. on Workbench 1.3 it is fine.
  75.  
  76. I am using the blitter, copying just one bitplane except when restoring the
  77. whole display. This means, that the program will draw no pupils when setting
  78. the number of workbench colors to 2. Clipping only one bitplane speeds up the
  79. clipping operation and avoids flickering on the workbench screen. It also
  80. saves process time. You should have seen the program before I changed from
  81. 2 bitplanes to 1 bitplane clipping. The changes are astounding.
  82.  
  83. The sources can be unpacked using lharc 1.1 or higher. The syntax is
  84. lharc -rxa x TG_Sources.lzh
  85. LHARC will create a subdirectory 'Sources' in which the sources are placed.
  86.  
  87.  
  88. (LAST MINUTE) BUG:
  89. If you have a CLI/SHELL window behind the TG Eyes window, then sizing,
  90. dragging or clicking to back/front of the CLI/SHELL or TG Eyes window will
  91. mess up the CLI/SHELL window display. I think, it is because CLI/SHELL uses
  92. simple refresh rather than smart refresh, and I have no idea how to fix this
  93. phenomenon quickly and well.
  94.  
  95.  
  96. Greetings go to
  97.  
  98. - Douglas Adams for his hitchhiker and Dirk Gently's detective agency.
  99.  
  100. - Dirk Remmelt for testing ( do not use "left amiga n" while sizing window
  101.   under workbench 1.2/1.3, it undergoes checking for window limits ), and of
  102.   course helping to debug this crazy eye-motion algorithm.
  103.  
  104. - Stefan Boldorf for testing,advice and his "legal stuff text" (thanks
  105.   a lot)!  When do you send your Free-Paint program to Fred Fish ?
  106.  
  107.  
  108. If you want to contact me, here is my full address:
  109.  
  110.   Thomas Geib
  111.   Eierstr. 9
  112.   6750 Kaiserslautern / Germany
  113.  
  114.  
  115.  
  116. II: SETTING PARAMETERS
  117. ----------------------
  118.  
  119.  
  120. From CLI you can set parameters:
  121.  
  122. Left window edge      :  X=nr
  123. Top window edge       :  Y=nr
  124. Window width          :  W=nr
  125. Window height         :  H=nr
  126. Maximum window width  : MW=nr
  127. Maximum window height : MH=nr
  128. Process delay time    :  D=nr     (refer to chapter I)
  129. Task priority         :  P=nr     (-128 <= nr <= 127 )
  130.  
  131. Example: "TG Eyes X=10 Y=20 W=200 H=100 MW=300 MH=120 D=5 P=-20"
  132. You may leave out any parameter as you like. The parameters do not need to
  133. have a certain order.
  134.  
  135.  
  136. From Workbench you can set parameters by editing the TG Eyes.info file:
  137.  
  138. Select the TG Eyes - icon and call the Workbench/Info menu:
  139. - Do adding/deleting parameters with ADD/DEL gadget.
  140. - Edit the parameter line(s):
  141.  
  142. Left window edge      : LEFTEDGE=nr
  143. Top window edge       : TOPEDGE=nr
  144. Window width          : WIDTH=nr
  145. Window height         : HEIGHT=nr
  146. Maximum window width  : MAXWIDTH=nr
  147. Maximum window height : MAXHEIGHT=nr
  148. Process delay time    : DELAY=nr
  149. Task priority         : PRIORITY=nr
  150.  
  151. NOTE:
  152.  
  153. - for setting parameters with starting program from WORKBENCH, you need the
  154.   libs:icon.library. If this library is not found, default values will be
  155.   used.
  156.  
  157. - if your parameters (from CLI as well as from WORKBENCH) are not reasonable
  158.   ( too small, too large, windows width is greater than maximum width etc. ),
  159.   the default values X=60 Y=18 W=196 H=72 MW=310 MH=110 D=5 P=-10 will be
  160.   used.
  161.  
  162.  
  163.  
  164.  
  165. III: CONDITIONS OF COPYING/DISTRIBUTION
  166. ---------------------------------------
  167.  
  168. This package consists of the files TG Eyes, TG Eyes.info, TG Eyes.doc,
  169. TG Eyes.doc.info and Sources/TG_Eyes.c, Sources/TG_Eyes.c.info, Sources/makefile.
  170.  
  171. The package and all its files are NOT Public Domain. However you are
  172. allowed to copy the package as long as ALL the following demands are met.
  173. Exception from any of the points below can only be granted by my expressed
  174. written consent.
  175.  
  176. 1. This package may only be distributed in its intact, unchanged form.
  177.    Altering, as well as omitting, expanding or any other change of the
  178.    package or any part of it is strictly forbidden!
  179.  
  180. 1. Neither this package, nor any portion of it may be included in a
  181.    commercial product.
  182.  
  183. 2. Neither this package, nor any portion of it may be used commercially.
  184.  
  185. 3. Neither this package, nor any portion of it may appear in an electronic
  186.    mailing facility, where an additional charge to your telephone bill is
  187.    upheld.
  188.  
  189. 4. The disk, this package is distributed on has to be priced below $6 in
  190.    the U.S.A. or the equivalent of DM 6 in Germany or any other country.
  191.  
  192. 5. Neither this package, nor any part of it may appear or be included in
  193.    any Public Domain series without my expressed written consent.
  194.  
  195. No guarantees, implicit or explicit are provided. The user is responsible
  196. for all damages resulting directly or indirectly from the use of this pack-
  197. age.
  198.  
  199.                                                Kaiserslautern, 31 July 1991
  200.